namespace Common {
    using System;
    using System.Collections.Generic;

    public class JSONArray : List<object> {
        public void Add(object item) {
            if (item.GetType().Name == "String") {
                item = JSONEncode.StrEncodeForDeserialize(item.ToString());
            }
            base.Add(item);
        }

        public JSONArray FromObject(string json) {
            return JsonHelper.DeserializeArray(json);
        }

        public override string ToString() {
            return JsonHelper.SerializeArray(this);
        }
    }
}

